import { createApp } from "vue";
import { ajax, baseUrl } from "@/ajax";
import routes from "@/routes";
import store from "@/store";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
// import "element-plus/theme-chalk/dark/css-vars.css";

import App from "./App.vue";
import "./App.less";

// 创建实例
const app = createApp(App);

//
app.config.globalProperties.$http = ajax;
app.config.globalProperties.$baseUrl = baseUrl;
// 3. 编译配置项
app.config.compilerOptions.whitespace = "preserve";

// element
app.use(ElementPlus, { size: "small", zIndex: 3000 });
app.use(routes);
app.use(store);

app.mount("#app");
// 渲染函数
// const render = () => {
//   document.getElementById("app").innerHTML = App;
// };

// render();
